<?php

namespace App\Models;

/*
 * Mock travel destination data.
 * Note that we don't have to extend CodeIgniter's model for now
 */

class Places {

    //mock data : an array of records
    protected $data = [
        '1' => [
            'id' => 1,
            'name' => 'Eason Chan',
            'Gender' => 'Male',
            'city' => 'Hong Kong',
            'description' => 'Born in Hong Kong, China, on July 27, 1974, born in Dongguan, Guangdong Province [1], male singer, actor and composer of Chinese pop music, with honorary doctorate degree from Kingston University, UK.',
            'brith' => 'July 27th, 1974 ',
            'achievement' => 'Best Mandarin Male Singer of the Third Taiwan Golden Melody Awards
Won the Most Popular Male Singer Award at the Top Ten Golden Songs Award Ceremony for two consecutive years',
            'image' => 'cyx.jpg',
        ],
        '2' => [
            'id' => 2,
            'name' => 'Jacky Cheung',
            'Gender' => 'Male',
            'city' => 'Hong Kong',
            'description' => 'Born in Hong Kong on July 10, 1961, he is a male pop singer, film actor and composer in Hong Kong, China. He graduated from Hong Kong Chongwen English Academy.',
            'brith' => 'July 10, 1961 ',
            'achievement' => 'The 35th Anniversary Honorary Award of Ten Chinese Golden Songs Top Ten Chinese Golden Melodies Gold Needle Award',
            'image' => 'zxy.jpg',
        ],
        '3' => [
            'id' => 3,
            'name' => 'BEYOND',
            'Gender' => 'Male',
            'city' => 'Hong Kong',
            'description' => 'In 1983, he participated in the "Shanye Guitar Competition" and won the championship and officially started his career. ',
            'brith' => 'Founded in 1983',
            'achievement' => 'Champion of Mens Singles, Mixed Doubles and Mens League of World Youth Table Tennis Championship',
            'image' => 'bio.jpg',
        ],
        '4' => [
            'id' => 4,
            'name' => 'Zhang Guorong',
            'Gender' => 'Male',
            'city' => 'Hong Kong',
            'description' => 'Male singer, actor and musician from Hong Kong, China. In 1977, she won the second place in the beautiful TV Asian Singing Competition in Hong Kong, thus entering the singing world.',
            'brith' => 'September 12, 1956 ',
            'achievement' => 'Overseas Chinese Daily Most Promising New Person Award',
            'image' => 'zgr.jpg',
        ],
        '5' => [
            'id' => 5,
            'name' => 'George Lam',
            'Gender' => 'Male',
            'city' => 'Hong Kong',
            'description' => 'Nicknamed Ah Lam, born in Hong Kong and native to Xinhui, Guangdong, he is a famous singer and actor in Hong Kong.',
            'brith' => 'October 2, 1947',
            'achievement' => 'Best Original Film Song of the 8th Hong Kong Film Awards',
            'image' => 'lzx.jpg',
        ],
    ];

    public function findAll() {
        return $this->data;
    }

    public function find($id = null) {
        if (!empty($id) && isset($this->data[$id])) {
            return $this->data[$id];
        }
        return null;
    }

}
